import { IsNotEmpty, IsNumber, IsString, Min } from "class-validator";

export class OrderDto {
    @Min(1)
    @IsNumber()
    deviceId:number;

    @Min(1)
    @IsNumber()
    port:number;

    @Min(0)
    @IsNumber()
    mode:number;

    @Min(0)
    @IsNumber({})
    chargeNumber:number;


    @Min(0)
    @IsNumber()
    payType:number;

}

export class OrderCardDto {
    @Min(1)
    @IsNumber()
    deviceId:number;

    @Min(1)
    @IsNumber()
    port:number;

    @Min(0)
    @IsNumber()
    mode:number;

    @Min(0)
    @IsNumber({})
    chargeNumber:number;

    @IsNotEmpty()
    @IsString()
    card:string;

}